package com.m4f.business.service.ifc;

import java.util.Collection;
import java.util.List;
import java.util.Map;

import com.m4f.business.model.Company;
import com.m4f.business.model.Vote;
import com.m4f.business.service.exception.DuplicatedVoteException;
import com.m4f.business.service.exception.VotesLimitExceedException;

public interface IVoteService {
	
	/**
	 * 
	 * @param vote
	 * @param company
	 */
	void addVote(Vote vote) throws DuplicatedVoteException, VotesLimitExceedException;
	
	Integer countVotes(String email);
	
	/**
	 * 
	 * @param init
	 * @param end
	 * @return
	 */
	Map<String, List<Vote>> getVotesIndexedByEmail(Long init, Long end);
	/**
	 * 
	 * @return
	 */
	List<Vote> getAllVotes();
	/**
	 * 
	 * @param companyId
	 * @return
	 */
	List<Vote> getVotesByCompany(Long  companyId);
	/**
	 * 
	 * @param email
	 * @return
	 */
	boolean removeVotes(String email);
}